import request from "../util/request";

export function Reg (params) {
    return request({
        url : '/user/reg',
        method :'post',
        params
    })
}

export function Login (params) {
    return request({
        url : '/user/login',
        method : 'post',
        params
    })
}

//修改昵称
export function UserUpdate (params)  {
    return request({
        url : '/user/update',
        method : 'post',
        params
    })
}

//设置交易密码
export function SetTradePwd (params) {
    return request({
        url : '/user/setTradePwd',
        method : 'post',
        params
    })
}

//修改交易密码
export function ChangeTragePwd (params) {
    return request({
        url : '/user/changeTradePwd',
        method : 'post',
        params
    })
}

//修改登录密码
export function ChangeLoginPwd (params) {
    return request({
        url : '/user/changePwd',
        method : 'post',
        params
    })
}

//用户认证
export function UserAuth (params) {
    return request({
        url : '/user/auth',
        method : 'post',
        params
    })
}

//会员中心信息接口
export function GetUserIndex (params) {
    return request({
        url : '/user/index',
        method : 'post',
        params
    })
}

//验证原手机号码
export function CheckOldTel (params) {
    return request({
        url : '/user/checkPhone',
        method : 'post',
        params
    })
}

//绑定新手机号码
export function BindNewTel (params) {
    return request({
        url : '/user/bind',
        method : 'post',
        params
    })
}

//綁定郵箱
export function BindMail (params) {
    return request({
        url : '/user/bindEmail',
        method : 'post',
        params
    })
}

//驗證舊郵箱
export function CheckOldEmail (params) {
	
	return request({
	    url : '/user/checkEmail',
	    method : 'post',
	    params
	})
}

//获取用户信息
export function GetUserInfo (params){
    return request({
        url : '/user/info',
        method : 'post',
        params
    })
}

//重置登录密碼
export function ResetLoginPwd (params) {
    return request({
        url : '/user/reset',
        method : 'post',
        params
    })
}

//信任屏幕他人操作
export function TrustHandle (params) {
    return request({
        url : '/user/trust',
        method : 'post',
        params
    })
}

//我的订单
export function UserOrder (params) {
    return request({
        url : '/trade/index',
        method : 'post',
        params
    })
}

//获取会员钱包信息
export function GetUserWallet (params) {
    return request({
        url : '/wallet/index',
        method : 'post',
        params
    })
}

//用户钱包提币操作
export function B2Money (params) {
    return request({
        url : '/wallet/withdraw',
        method : 'post',
        params
    })
}

//账户明细
export function WalletDetail (params) {
    return request({
        url :'/wallet/record',
        method : 'post',
        params
    })
}

//获取信任列表
export function GetTrustList (params) {
    return request({
        url :'/user/record',
        method : 'post',
        params
    })
}